package org.ymjava.medical.wx.web;


import org.omg.CORBA.OBJ_ADAPTER;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ymjava.medical.core.util.ResponseUtil;
import org.ymjava.medical.db.AllPackage.biz.BankForUserBiz;
import org.ymjava.medical.db.AllPackage.biz.QuestionBankBiz;
import org.ymjava.medical.db.AllPackage.entity.BankForUser;
import org.ymjava.medical.db.AllPackage.entity.QuestionBank;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/wx_answer/draw_question")
public class DrawQuestionController {


    @Autowired
    BankForUserBiz bankForUserBiz;

    @Autowired
    QuestionBankBiz questionBankBiz;

    @GetMapping("/get_list")
    public Object get_list(Integer userId){

        Map<String, Object> data = new HashMap<>();

        List<QuestionBank> list_bank = questionBankBiz.queryByUserId(userId);

        data.put("list_bank",list_bank);

        return ResponseUtil.ok(data);
    }
}
